﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Map </title>
			<style type="text/css"> 
			#title{ 					
					font: 80px 굴림;
					margin-left : 0px;
					background-image(img/title.jpg);
					color : black;
					}   
			.indexButton{
					
					border: 1x solid #ff0080;
					color : #ff0080;
					background-Color:#ffe6f2;
					font: 80px 굴림;
					font-weight: bold;
					width:  80; height:80;
					padding-right: 30px;
			
			}		
			</style>
<script type="text/javascript" src="http://apis.daum.net/maps/maps2.js?apikey=93fd0e6f69a94f9ab4040082def1427a38d66de6">
</script>
</head>
<body>
		<div id="title">
			<img src="img/mg.jpg" width="200" height="200" alt="main image" />
			음식점 위생등급정보 
			<input type="button" value="Return main" onclick="returnmain()" class="indexButton">
		</div>
	<div id="map" style="width:1200px;height:800px;"></div>
	<div id="r"></div>
	<script type="text/javascript">
	function returnmain()
			 {  
				document.location="index.html";
				} 
	function toggleOpenMark(mark_no)
	{
		if(marks[mark_no].options.infowindow.isShow())
			marks[mark_no].options.infowindow.hide();
		else
			marks[mark_no].options.infowindow.show();
	}
 
 
	var map = new DMap("map");
	map.setCenter(new DLatLng(37.512428916538106, 127.05882541982726), 2);
	map.addControl(new DIndexMapControl());
	map.addControl(new DZoomControl());
	var marks = new Array(100);
 
	DDownloadUrl("coord/data.xml", function(_xml){
		var _marker = _xml.getElementsByTagName("marker");
 
		for (var i = 0; i < _marker.length; i++){
            var point = new DLatLng(parseFloat(_marker[i].getAttribute("lat")), parseFloat(_marker[i].getAttribute("lng")));
			var marker_name = _marker[i].getAttribute("name");
			var marker_location = _marker[i].getAttribute("loac");
			var marker_phone=_marker[i].getAttribute("phone");
			var marker_homepage=_marker[i].getAttribute("homepage");
			var infoBoxMessage = "<strong> 음식점 이름 : </strong>"+marker_name+ "<br>"+"<strong> 주소 : </strong>" +marker_location+"<br>"
			+"<strong> 전화번호 : </strong>"+marker_phone+"<br>"+"<strong> 홈페이지 주소 : </strong>"+marker_homepage;
			
			marks[i] = new DMark(point, { infowindow : new DInfoWindow(infoBoxMessage, {width:270, height:160}), draggable:false });
            map.addOverlay(marks[i]);
		}
		map.setCenter(point, 4);
 
	});
	
 
	setTimeout("toggleOpenMark(2)", 1000);
	setTimeout("toggleOpenMark(2)", 2000);
	setTimeout("toggleOpenMark(2)", 3000);
	setTimeout("toggleOpenMark(2)", 4000);

	</script>
</body>
</html>
